﻿using AutoMapper;
using Leo.Awesome.DictionaryManagement.Domain;
using Leo.Awesome.DictionaryManagement.Dtos;
using Volo.Abp.AutoMapper;

namespace Leo.Awesome.DictionaryManagement.Maps
{
    public class DictionaryItemProfile : Profile
    {
        public DictionaryItemProfile()
        {
            CreateMap<DictionaryItem, DictionaryItemGetOutPutDto>().Ignore(x=>x.DictionaryName);

            CreateMap<DictionaryItem, DictionaryItemGetListOutputDto>().Ignore(x => x.DictionaryName);

            CreateMap<DictionaryItemGetOutPutDto, DictionaryItem>()
                .IgnoreFullAuditedObjectProperties();

            CreateMap<DictionaryItem, DictionaryItemCreateUpdateInput>();

            CreateMap<DictionaryItemCreateUpdateInput, DictionaryItem>()
                .IgnoreFullAuditedObjectProperties();


            CreateMap<DictionaryItemGetOutPutDto, DictionaryItemCreateUpdateInput>();
        }
    }
}
